﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using NHibernate.Mappings;

namespace Apollo.Modules.Commissioning
{
    [NHibernateEntity(Table = "CommissionPayrolls")]
    public class CommissionPayroll
    {
        public CommissionPayroll() { }

        [PrimaryKey]
        public virtual int Id { get; set; }
        
        [BelongsTo(Column = "ID_Employee")]
        public virtual Employee Employee { get; set; }

        [BelongsTo(Column = "ID_CommissionCalculation")]
        public virtual CommissionCalculation CommissionCalculation { get; set; }

        [Property]
        public virtual double GrossValue { get; set; }


        [Property(Column="Quaranty")]
        public virtual double G { get; set; }

        [Property(Column="GCLBK")]
        public virtual double GCR { get; set; }

        [Property]
        public virtual double CLBK { get; set; }

        [Property]
        public virtual double NCF { get; set; }

        [Property]
        public virtual double GCC { get; set; }



        // History to data wharehouse use

        [Property(Column = "QuarantyFund")]
        public virtual double? FG { get; set; }

        [Property(Column="NCFFund")]
        public virtual double? FNF { get; set; }

        [Property]
        public virtual double? FGC { get; set; }





        [Property]
        public virtual int? CalculationMonth { get; set; }

        [BelongsTo(Column = "ID_Role")]
        public virtual Role Role { get; set; }

        [BelongsTo(Column = "ID_Position")]
        public virtual Position Position { get; set; }

        [Property]
        public virtual State State { get; set; }
    }
}
